import Vue from 'vue'
import Router from 'vue-router'

// 懒加载
const Home = () => import('@/pages/home/Home')
const Cart = () => import('@/pages/Cart/cart')
const Profile = () => import('@/pages/Profile/profile')
const Category = () => import('@/pages/Category/category')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/home'
    },{
      path:'/home',
      component: Home
    },
    {
      path: '/cart',
      component: Cart
    },{
      path: '/profile',
      component: Profile
    },{
      path: '/category',
      component: Category
    }
  ]
})
